package com.homework;

public class Simulator implements Animal {
    void playSound(Animal animal){
        animal.cry();
        System.out.println("动物类型是"+animal.getAnimalName());
    }

    @Override
    public void cry() {
        this.cry();
    }

    @Override
    public String getAnimalName() {
        return this.getAnimalName();
    }
}
